From fe21ce6f0b58e0ba5c729fdd0afc3093fe8ff6b0 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Wed, 31 Aug 2016 14:41:41 +0200 Subject: [PATCH] Move definition of which-key--local-binding-p It has to be defined after the inline functions which it uses. --- which-key.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/which-key.el b/which-key.el index 0c98a9ab2cc..90aea83f7b4 100644 --- a/which-key.el +++ b/which-key.el @@ -1202,11 +1202,6 @@ coming before a prefix. Within these categories order using (and (not apref?) bpref?) (which-key-key-order acons bcons)))) -(defun which-key--local-binding-p (keydesc) - (eq (which-key--safe-lookup-key - (current-local-map) (kbd (which-key--current-key-string (car keydesc)))) - (intern (cdr keydesc)))) - (defun which-key-local-then-key-order (acons bcons) "Order first by whether A and/or B is a local binding with local bindings coming first. Within these categories order using @@ -1254,6 +1249,11 @@ replacement occurs return the new STRING." (defsubst which-key--current-key-string (&optional key-str) (key-description (which-key--current-key-list key-str))) +(defun which-key--local-binding-p (keydesc) + (eq (which-key--safe-lookup-key + (current-local-map) (kbd (which-key--current-key-string (car keydesc)))) + (intern (cdr keydesc)))) + (defun which-key--maybe-replace-prefix-name (keys desc) "KEYS is a list of keys produced by `listify-key-sequences' and `key-description'. DESC is the description that is possibly -- 2.30.2